package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Department;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DepartmentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Department entity);

    Department selectByPrimaryKey(Long id);

    List<Department> selectAll();

    int updateByPrimaryKey(Department entity);

    int updateState(@Param("deptId") Long id, @Param("state") int state);

    int queryForCount(QueryObject qo);

    List<Department> queryForList(QueryObject qo);

    /**
     * 查询总部
     */
    /*List<Department> queryHQ(QueryObject qo);*/
}